package my;

import net.egork.io.IOUtils;
import net.egork.io.InputReader;
import java.io.PrintWriter;

public class TaskB {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.readInt();
        int[] a = IOUtils.readIntArray(in, n);
        int sum = 0;
        for (int i = 0; i < n; ++i)
            sum += a[i];
        if (sum % n == 0)
            out.println(n);
        else
            out.println(n - 1);
    }
}
